Technote Number: 1208843
Problem:
This issue was reported to Quality Engineering as SPR# EDDN6CYNSZ and
NBRR6AVQSD and has been fixed in Notes/Domino 6.5.5 and 7.0. Refer to the
Upgrade Central site for details on upgrading Notes/Domino.
Excerpt from the Lotus Notes and Domino Release 6.5.5 fix list (available at
http://www.ibm.com/developerworks/lotus):
SPR# EDDN6CYNSZ - Set NotesRichTextNavigator = NotesRichTextRange.Navigator
caused an NSD in Notes 6.0.3 and above. This regression was introduced in 6.0.3.
Workaround
The issue may be more common when either or both of the following are true:
- The code referring to the NotesRichTextNavigator class resides within a
function or subroutine or the relative NotesRichTextItem variable is declared
globally rather than locally. In this scenario, you can work around by moving
the NotesRichTextItem declaration locally or removing the code from the
subroutine or function and calling it directly.
- When the NotesDocument object handle is obtained by making use of the
CurrentDocument property (of the NotesUIWorkspace class) and the Document
property (of the NotesUIDocument class). In this scenario, if the code is
within an action or agent, then try using the DocumentContext property (of the
NotesSession class) to get a handle to the document.
Supporting Information
The Navigator property is used when accessing more than one cell in a table,
and the issue can be observed when using the FindFirstElement and
FindNextElement methods to cycle through the cells as well as when using the
GetNthElement method two or more times.
The following code that recreates the issue demonstrates an example where the
FindFirstElement and FindNextElement methods are used:
Dim s As New NotesSession
Dim document As NotesDocument
Dim rtitem As NotesRichTextItem
Dim rtnavTable As NotesRichTextNavigator
Dim rtrangeCell As NotesRichTextRange
Dim rtnavCell As NotesRichTextNavigator
Dim rtnavflag As Boolean
Dim rtt As NotesRichTextTable
Dim rtnav As NotesRichTextNavigator
Dim rtrangePara As NotesRichTextRange
Set doc=s.documentcontext
Set rtitem=doc.GetFirstItem("Body")
'Get a handle to the table
Set rtnav = rtitem.CreateNavigator
Call rtnav.FindFirstElement(RTELEM_TYPE_TABLE)
Set rtt = rtnav.GetElement
'Instantiate the navigators and ranges
Set rtnavTable = rtitem.CreateNavigator
Set rtrangeCell = rtitem.CreateRange
Set rtrangePara = rtitem.CreateRange
'Get the first table cell and create a range for it
Call rtnavTable.FindFirstElement(RTELEM_TYPE_TABLECELL)
Call rtrangeCell.SetBegin(rtnavTable)
Set rtnavCell = rtrangeCell.Navigator
For i = 1 To rtt.RowCount
For j = 1 To rtt.ColumnCount
'Get paragraph in the cell
Call rtnavCell.FindFirstElement(RTELEM_TYPE_TEXTPARAGRAPH)
Call rtrangePara.SetBegin(rtnavCell)
Call rtrangePara.SetEnd(rtnavCell)
celltext = rtrangePara.TextParagraph
Print "Row: " & i & ", Col: " & j & " =" & celltext
'Get next table cell
Call rtnavTable.FindNextElement(RTELEM_TYPE_TABLECELL)
Call rtrangeCell.SetBegin(rtnavTable)
Set rtnavCell = rtrangeCell.Navigator
Next
Next More >
|  |
|
|
|
|